-- GENERATED SPELL FOR [Black Broodling] --


function spell0_7047(pUnit, Event) --@Create Broodling Essence,n/a--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(16027,pUnit:GetMainTank ())
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_7047', 1, 1)
end

function spell1_7047(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(13375,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7047', 3000, 1)
end

function Sorts_7047(pUnit, Event)
local choix_sorts_7047 = math.random(0, 1)
if choix_sorts_7047 == 0 then
pUnit:RegisterEvent('spell0_7047', 1, 1)
end
if choix_sorts_7047 == 1 then
pUnit:RegisterEvent('spell1_7047', 1, 1)
end
end

function mob7047_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7047', math.random(1500, 3000), 1)
end

function mob7047_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7047_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7047_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7047, 1, 'mob7047_Action')
RegisterUnitEvent(7047, 2, 'mob7047_Leave')
RegisterUnitEvent(7047, 3, 'mob7047_Kill')
RegisterUnitEvent(7047, 4, 'mob7047_Die')
